<h1>Lessons List</h1>

<table>
  <thead>
    <tr>
      <th>Id</th>
      <th>Title</th>
      <th>Homework</th>
      <th>Lesson date</th>
      <th>Grade</th>
      <th>Teacher</th>
      <th>Subject</th>
      <th>Lesson type</th>
      <th>Created at</th>
      <th>Updated at</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($lessons as $lesson): ?>
    <tr>
      <td><a href="<?php echo url_for('lesson/show?id='.$lesson->getId()) ?>"><?php echo $lesson->getId() ?></a></td>
      <td><?php echo $lesson->getTitle() ?></td>
      <td><?php echo $lesson->getHomework() ?></td>
      <td><?php echo $lesson->getLessonDate() ?></td>
      <td><?php echo $lesson->getGradeId() ?></td>
      <td><?php echo $lesson->getTeacherId() ?></td>
      <td><?php echo $lesson->getSubjectId() ?></td>
      <td><?php echo $lesson->getLessonTypeId() ?></td>
      <td><?php echo $lesson->getCreatedAt() ?></td>
      <td><?php echo $lesson->getUpdatedAt() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('lesson/new') ?>">New</a>
